import request from "@/axios";

// 点价/确定价 下单采购
export const confirmorder = option =>
  request({
    url: "/api/order/confirmorder",
    method: "post",
    data: option
  });

// 卖家中心,查询确定价销售订单列表
export const querySalesConfirmOrders = option =>
  request({
    url: "/api/order/querysalesconfirmorderpage",
    method: "post",
    data: option
  });

// 卖家中心,查询点价销售订单列表
export const querySalesSlideOrders = option =>
  request({
    url: "/api/order/querysalesslideorderpage",
    method: "post",
    data: option
  });

// 买家中心,查询确定价销售订单列表
export const queryPurchaseConfirmOrders = option =>
  request({
    url: "/api/order/querypurchaseconfirmorderpage",
    method: "post",
    data: option
  });

// 买家中心,查询点价销售订单列表
export const queryPurchaseslideOrders = option =>
  request({
    url: "/api/order/querypurchaseslideorderpage",
    method: "post",
    data: option
  });

// // 查询采购订单详情
// export const getPurchaseOrderDetail = option =>
//   request({
//     url: "/api/order/getpurchaseorder",
//     method: "get",
//     params: option
//   });

// // 查询销售订单详情
// export const getSalesOrderDetail = option =>
//   request({
//     url: "/api/order/getsalesorder",
//     method: "get",
//     params: option
//   });

// 查询订单详情
export const getOrderDetail = option =>
  request({
    url: "/api/order/getorderbyid",
    method: "get",
    params: option
  });

// 卖家确认确定价订单
export const acceptconfirmorder = option =>
  request({
    url: "/api/order/provideracceptconfirmorder",
    method: "get",
    params: option
  });

// 卖家拒绝确定价订单
export const refuseconfirmorder = option =>
  request({
    url: "/api/order/providerrefuseconfirmorder",
    method: "get",
    params: option
  });

// 卖家确认点价订单
export const acceptslideorder = option =>
  request({
    url: "/api/order/provideracceptslideorder",
    method: "get",
    params: option
  });

// 卖家拒绝点价订单
export const refuseslideorder = option =>
  request({
    url: "/api/order/providerrefuseslideorder",
    method: "get",
    params: option
  });

// 卖家取消点价订单
export const providercancelslideorder = option =>
  request({
    url: "/api/order/providercancelslideorder",
    method: "get",
    params: option
  });

// 卖家取消点价订单（套保）
export const providercancelslidehedgeorder = option =>
  request({
    url: "/api/order/providercancelslidehedgeorder",
    method: "get",
    params: option
  });

// 买家取消确定价订单
export const cancelconfirmorder = option =>
  request({
    url: "/api/order/customercancelconfirmorder",
    method: "get",
    params: option
  });

// 买家取消点价订单
export const cancelslideorder = option =>
  request({
    url: "/api/order/customercancelslideorder",
    method: "get",
    params: option
  });

// 买家查询订单记录
export const customergetorderlog = option =>
  request({
    url: "/api/order/customergetorderlog",
    method: "get",
    params: option
  });

// 卖家查询订单记录
export const providergetorderlog = option =>
  request({
    url: "/api/order/providergetorderlog",
    method: "get",
    params: option
  });

// 卖家查询成交记录
export const providergetorderdeallog = option =>
  request({
    url: "/api/order/providergetorderdeallog",
    method: "get",
    params: option
  });

// 买家查询成交记录
export const customergetorderdeallog = option =>
  request({
    url: "/api/order/customergetorderdeallog",
    method: "get",
    params: option
  });

// 点价订单部分成交(非套保单)
export const providerpartdealslideorder = option =>
  request({
    url: "/api/order/providerpartdealslideorder",
    method: "post",
    data: option
  });

// 点价订单全部成交(非套保单)
export const provideralldealslideorder = option =>
  request({
    url: "/api/order/provideralldealslideorder",
    method: "get",
    params: option
  });

// 点价订单全部成交(套保)
export const provideralldealslidehedgeorder = option =>
  request({
    url: "/api/order/provideralldealslidehedgeorder",
    method: "get",
    params: option
  });

// 买家申请撤单
export const customerrevokeslideorder = option =>
  request({
    url: "/api/order/customerrevokeslideorder",
    method: "get",
    params: option
  });

// 买家申请撤单（套保）
export const customerrevokeslidehedgeorder = option =>
  request({
    url: "/api/order/customerrevokeslidehedgeorder",
    method: "get",
    params: option
  });

// 卖家同意撤单
export const provideracceptrevokeslideorder = option =>
  request({
    url: "/api/order/provideracceptrevokeslideorder",
    method: "get",
    params: option
  });

// 卖家拒绝撤单
export const providerrejectrevokeslideorder = option =>
  request({
    url: "/api/order/providerrejectrevokeslideorder",
    method: "get",
    params: option
  });

// 卖家订单编辑备注
export const addproviderorderremark = option =>
  request({
    url: "/api/order/addproviderorderremark",
    method: "post",
    data: option
  });

// 买家订单编辑备注
export const addcustomerorderremark = option =>
  request({
    url: "/api/order/addcustomerorderremark",
    method: "post",
    data: option
  });
